package com.starsoft.smdc.bean;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "smdc_fundnav_pre")
public class SmdcFundNavPre {

	public enum SmdcFundNavPreSystem {
		easyMoney, local;
	}

	private Integer preId;
	private String secId;
	private Date preDate;
	private Double preNav;
	private SmdcFundNavPreSystem preSystem;

	public SmdcFundNavPre() {
		super();
	}

	public SmdcFundNavPre(Integer preId) {
		super();
		this.preId = preId;
	}

	public SmdcFundNavPre(Integer preId, String secId, Date preDate, Double preNav, SmdcFundNavPreSystem preSystem) {
		super();
		this.preId = preId;
		this.secId = secId;
		this.preDate = preDate;
		this.preNav = preNav;
		this.preSystem = preSystem;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "preId", unique = true, nullable = false)
	public Integer getPreId() {
		return preId;
	}

	public void setPreId(Integer preId) {
		this.preId = preId;
	}

	@Column(name="secId")
	public String getSecId() {
		return secId;
	}

	public void setSecId(String secId) {
		this.secId = secId;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "preDate", length = 10)
	public Date getPreDate() {
		return preDate;
	}

	public void setPreDate(Date preDate) {
		this.preDate = preDate;
	}

	@Column(name="preNav")
	public Double getPreNav() {
		return preNav;
	}

	public void setPreNav(Double preNav) {
		this.preNav = preNav;
	}

	@Column(name="preSystem")
	public SmdcFundNavPreSystem getPreSystem() {
		return preSystem;
	}

	public void setPreSystem(SmdcFundNavPreSystem preSystem) {
		this.preSystem = preSystem;
	}

	@Override
	public String toString() {
		return "SmdcFundNavPre [preId=" + preId + ", secId=" + secId + ", preDate=" + preDate + ", preNav=" + preNav
				+ ", preSystem=" + preSystem + "]";
	}

}
